package com.nptever.webcamera.impl.request;

import javax.xml.bind.annotation.*;

/**
 * @author ZhangKai
 * @version 1.0
 * @decription 设置视频配置请求体
 * @date 2018/11/16 17:33
 */
@XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)
public class SetVideoEncoderConfigurationBody extends GetServices{

    @XmlAttribute
    private String xmlns = "http://www.onvif.org/ver10/media/wsdl";

    /**
     * 使用继承方式序列化xml 需要按照如下注解方式进行， 否则序列化结果只会包含父类节点信息，会丢失层次信息
     * 配置信息类
     */
    @XmlElements(
            @XmlElement(name = "Configuration", type = VideoConfiguration.class)
    )
    private VideoConfiguration configuration;

    /**
     * 强制持久化
     */
    @XmlElement
    private String ForcePersistence = "false";

    public void setConfiguration(VideoConfiguration configuration) {
        this.configuration = configuration;
    }

    public void setForcePersistence(String forcePersistence) {
        ForcePersistence = forcePersistence;
    }
}
